{# Overseer > Code (overseer_code), filling the page below its header (``.overseer-fill``): the tree and the file scroll, the page does not. A click in the tree swaps the file alone, so the tree keeps its scroll and the folders the viewer opened (app.js moves its mark); on a fresh load the folders down to the file start open. The box above the tree jumps to any file by name (Cmd-P, app.js). The chips scope the tree to a component's or service's files, every folder down to them open, and the path above the file to one of its folders: either swaps tree and file together. A name clicked in a Python file peeks beside it: its definition and references (app.js, ``_symbol.html``). #} {% from "components/macros/layout.html" import code_block %} {% from "components/macros/feedback.html" import empty_state %} {% from "components/macros/form.html" import range_form, search_input %} {% macro code_tree(nodes) %} {% endmacro %}
{% if code_nodes is not none %}
{{ range_form(code_owners(navigation), code_scope.owner, code_unscoped, "#" ~ code_page.view, field=code_page.owner, aria="Scope", id="code-scope") }} {% if code_spread %}

{{ code_spread[0] }} files in {{ code_spread[1] }} folders

{% endif %}
{% endif %}
{% if code_nodes is not none %}
{{ search_input(code_page.file, placeholder="Jump to file", attrs='list="code-files" data-code-jump') }} {% for path in code_files %}{% endfor %}
{% endif %}
{% if code_source is not none %} {% if code_symbol %}
{% endif %} {% set caption %}{% for name, url in code_crumbs %}{{ name }}/{% endfor %}{{ code_path.rpartition("/")[2] }} ยท {{ code_version }}{% endset %} {{ code_block(code_source, caption=caption, filename=code_path, lines=True) }} {% elif code_path %}
{{ empty_state(code_path ~ " is not shown here", "Only the project's source is: pick a file in the tree.") }}
{% else %} {{ empty_state("No file open", "Pick a file in the tree.") }} {% endif %}